package com.pinyoumei.app.adapter;

import android.support.annotation.Nullable;
import android.widget.ImageView;

import com.pinyoumei.app.R;
import com.pinyoumei.app.bean.NewUserHelperBean;
import com.bumptech.glide.Glide;
import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;

import java.util.List;

/**
 * Created by Administrator on 2021-08-09.
 * --------- 日期 ------- 维护人 ------------ 变更内容 --------
 * 2021-08-09        Administrator             新增Person类
 * 2021-08-09        Administrator             增加sex属性
 */
public class NewUserAdapter extends BaseQuickAdapter<NewUserHelperBean .ResultBean.InfoListBean, BaseViewHolder> {
    public NewUserAdapter(int layoutResId, @Nullable List<NewUserHelperBean .ResultBean.InfoListBean> data) {
        super(layoutResId, data);
    }

    @Override
    protected void convert(BaseViewHolder helper, NewUserHelperBean .ResultBean.InfoListBean item) {
        ImageView imageView =  helper.getView(R.id.iv_bg);

        Glide.with(mContext).load(item.getList_img()).into(imageView);

        helper.setText(R.id.tv_title,item.getTitle());
        helper.setText(R.id.tv_publish_time,item.getPublish_time());
        helper.setText(R.id.tv_read_num,"阅读  " + item.getRead_num());
    }
}
